-- GENERATED SPELL FOR [High Tinker Mekkatorque] --


function spell0_7937(pUnit, Event) --@Bomb,n/a--
pUnit:FullCastSpellOnTarget(9143,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7937', 2000, 1)
end

function spell1_7937(pUnit, Event) --@Goblin Dragon Gun,Self--
pUnit:FullCastSpellOnTarget(22739,pUnit)
pUnit:RegisterEvent('Sorts_7937', 8000, 1)
end

function spell2_7937(pUnit, Event) --@Super Shrink Ray,n/a--
pUnit:FullCastSpellOnTarget(22742,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7937', 20325, 1)
end

function Sorts_7937(pUnit, Event)
local choix_sorts_7937 = math.random(0, 2)
if choix_sorts_7937 == 0 then
pUnit:RegisterEvent('spell0_7937', 1, 1)
end
if choix_sorts_7937 == 1 then
pUnit:RegisterEvent('spell1_7937', 1, 1)
end
if choix_sorts_7937 == 2 then
pUnit:RegisterEvent('spell2_7937', 1, 1)
end
end

function mob7937_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_7937', math.random(1500, 3000), 1)
end

function mob7937_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7937_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7937_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(7937, 1, 'mob7937_Action')
RegisterUnitEvent(7937, 2, 'mob7937_Leave')
RegisterUnitEvent(7937, 3, 'mob7937_Kill')
RegisterUnitEvent(7937, 4, 'mob7937_Die')
